package easy;

import java.util.ArrayList;
import java.util.List;

public class Solution_448 {

    public List<Integer> findDisappearedNumbers(int[] nums) {
        List<Integer> list = new ArrayList<>();
        boolean[] arr = new boolean[nums.length];
        for (int num : nums) {
            arr[num - 1] = true;
        }
        for (int i = 0; i < arr.length; i++) {
            if (!arr[i]) {
                list.add(i + 1);
            }
        }
        return list;
    }

    public static void main(String[] args) {
        Solution_448 model = new Solution_448();
        System.out.println(model.findDisappearedNumbers(new int[]{4, 3, 2, 7, 8, 2, 3, 1}));
    }
}
